Electronic locks are well known and are useful for securing doors, cabinets, desks or other types of units. Such locks have keys with magnetically or electronically stored key codes which are readable by the locks and permit opening of a lock when the key code corresponds to an access code stored in the lock. Each lock may be furnished with several access codes so that several unique keys will open the lock and each key may open more than one lock. To allow authorized users to determine which keys will match a given lock, a programming procedure is provided.
One key for each lock is designated as a master key and its key code is stored in the lock as a master code. When the master key is presented to the lock and then another key is presented, the lock is enabled to learn access codes from the other key. The master key is also useful to erase access codes and even the master code when key changes are desired. If, however, the master key is lost, or is obtained by an unauthorized person, key code changes are necessary but cannot be accomplished by the usual method. It is then important to be able to reset the lock to allow a new master code to be entered. It is equally important that only approved persons be able to use the reset procedure.